#!/bin/bash
# $Id: polar_ir.group,v 1.1 2002/12/28 07:40:20 dave Exp $
#
# /etc/hotplug/usb/polar_ir
#
# Sets up newly plugged in polar USB IR interface so that only members of the 
# group

GROUP=polar

# can access it from user space. (Replace polar by the name of the
# group you want to have access to the device.)
#
# Note that for this script to work, you'll need all of the following:
# a) a line in the file /etc/hotplug/usermap that corresponds to the 
#    interface you are using (use the contents of polar_usb.usermap)
# b) run s710sh/s710d as the user given above
# c) a Linux kernel supporting hotplug and usbdevfs
# d) the hotplug package (http://linux-hotplug.sourceforge.net/)
#
# In the usermap file, the first field "usb module" should be named 
# "polar_ir" like this script.
# 

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    chmod o-rwx "${DEVICE}"
    chgrp "${GROUP}" "${DEVICE}"
    chmod g+rw "${DEVICE}"
fi
